3.519 \(\int \sec ^4(c+d x) (a+b \tan (c+d x))^2 \, dx\)

Optimal. Leaf size=75 \[ \frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^3}{3 b^3 d}+\frac{(a+b \tan (c+d x))^5}{5 b^3 d}-\frac{a (a+b \tan (c+d x))^4}{2 b^3 d} \]

[Out]

((a^2 + b^2)*(a + b*Tan[c + d*x])^3)/(3*b^3*d) - (a*(a + b*Tan[c + d*x])^4)/(2*b^3*d) + (a + b*Tan[c + d*x])^5
/(5*b^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0659744, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^3}{3 b^3 d}+\frac{(a+b \tan (c+d x))^5}{5 b^3 d}-\frac{a (a+b \tan (c+d x))^4}{2 b^3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4*(a + b*Tan[c + d*x])^2,x]

[Out]

((a^2 + b^2)*(a + b*Tan[c + d*x])^3)/(3*b^3*d) - (a*(a + b*Tan[c + d*x])^4)/(2*b^3*d) + (a + b*Tan[c + d*x])^5
/(5*b^3*d)

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \sec ^4(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int (a+x)^2 \left (1+\frac{x^2}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{\left (a^2+b^2\right ) (a+x)^2}{b^2}-\frac{2 a (a+x)^3}{b^2}+\frac{(a+x)^4}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^3}{3 b^3 d}-\frac{a (a+b \tan (c+d x))^4}{2 b^3 d}+\frac{(a+b \tan (c+d x))^5}{5 b^3 d}\\ \end{align*}

Mathematica [A]  time = 0.186638, size = 54, normalized size = 0.72 \[ \frac{(a+b \tan (c+d x))^3 \left (a^2-3 a b \tan (c+d x)+6 b^2 \tan ^2(c+d x)+10 b^2\right )}{30 b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4*(a + b*Tan[c + d*x])^2,x]

[Out]

((a + b*Tan[c + d*x])^3*(a^2 + 10*b^2 - 3*a*b*Tan[c + d*x] + 6*b^2*Tan[c + d*x]^2))/(30*b^3*d)

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 82, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ({b}^{2} \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}+{\frac{2\, \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{15\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}} \right ) +{\frac{ab}{2\, \left ( \cos \left ( dx+c \right ) \right ) ^{4}}}-{a}^{2} \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) \tan \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*(a+b*tan(d*x+c))^2,x)

[Out]

1/d*(b^2*(1/5*sin(d*x+c)^3/cos(d*x+c)^5+2/15*sin(d*x+c)^3/cos(d*x+c)^3)+1/2*a*b/cos(d*x+c)^4-a^2*(-2/3-1/3*sec
(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.52541, size = 96, normalized size = 1.28 \begin{align*} \frac{6 \, b^{2} \tan \left (d x + c\right )^{5} + 15 \, a b \tan \left (d x + c\right )^{4} + 30 \, a b \tan \left (d x + c\right )^{2} + 10 \,{\left (a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{3} + 30 \, a^{2} \tan \left (d x + c\right )}{30 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a+b*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

1/30*(6*b^2*tan(d*x + c)^5 + 15*a*b*tan(d*x + c)^4 + 30*a*b*tan(d*x + c)^2 + 10*(a^2 + b^2)*tan(d*x + c)^3 + 3
0*a^2*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.88768, size = 184, normalized size = 2.45 \begin{align*} \frac{15 \, a b \cos \left (d x + c\right ) + 2 \,{\left (2 \,{\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} +{\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )}{30 \, d \cos \left (d x + c\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a+b*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

1/30*(15*a*b*cos(d*x + c) + 2*(2*(5*a^2 - b^2)*cos(d*x + c)^4 + (5*a^2 - b^2)*cos(d*x + c)^2 + 3*b^2)*sin(d*x
+ c))/(d*cos(d*x + c)^5)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right )^{2} \sec ^{4}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*(a+b*tan(d*x+c))**2,x)

[Out]

Integral((a + b*tan(c + d*x))**2*sec(c + d*x)**4, x)

________________________________________________________________________________________

Giac [A]  time = 1.32014, size = 108, normalized size = 1.44 \begin{align*} \frac{6 \, b^{2} \tan \left (d x + c\right )^{5} + 15 \, a b \tan \left (d x + c\right )^{4} + 10 \, a^{2} \tan \left (d x + c\right )^{3} + 10 \, b^{2} \tan \left (d x + c\right )^{3} + 30 \, a b \tan \left (d x + c\right )^{2} + 30 \, a^{2} \tan \left (d x + c\right )}{30 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a+b*tan(d*x+c))^2,x, algorithm="giac")

[Out]

1/30*(6*b^2*tan(d*x + c)^5 + 15*a*b*tan(d*x + c)^4 + 10*a^2*tan(d*x + c)^3 + 10*b^2*tan(d*x + c)^3 + 30*a*b*ta
n(d*x + c)^2 + 30*a^2*tan(d*x + c))/d